home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
fido
/
XPACK275.lha
/
DOCS
/
Xferq.Addendum
< prev
next >
Wrap
Text File
|
1994-05-01
|
3KB
|
83 lines
Addendum to XferQ.library Developer's Documentation
by
Robert Williamson
Xferq.Library is by David Jones
6730 Tooney Drive
Orleans, Ontario
K1C 6R4
CANADA
email: aa457@freenet.carleton.ca
fido: 1:163/109.8
Disposition of files:
The Developer's Documentation does not indicate that a file will be
deleted if the session goes down without having sent it AND it was queued
with the user flags XQ_DELETE and XQ_IMMEDIATE. This ftn-specific quirk is
used by wpl.library to delete those temporary packets it creates during
sessions that require a dummy or poll packet. However this specificity
violates the multi-network nature of xferq.library.
Since wpl.library source is not yet available, it is not possible
the correct it so that it respects it's responsibility to delete it's own
temporary files. Therefore, this version of xferq.library ADDS a new user
flag to insure that one IS able to queue a file in immediate mode with the
confidence that it will NOT be deleted if it was NOT SENT.
This new user flag is XQ_IFSENT. It only comes into play IF the
session goes down without sending the file. If both XQ_DELETE and
XQ_IMMEDIATE are true, and XQ_IFSENT is TRUE, the file will NOT be deleted
if it has not been sent.
These changes should be both compatible and transparent to all
applications. Only those applications that actually followed the
documentation will have to be changed.
For those interested the code changes are as follows:
xferq.h:
/*
* User flags
*/
#define XQ_DELETE 1 /* Delete file after sending */
#define XQ_TRUNCATE 2 /* Truncate file after sending */
#define XQ_IMMEDIATE 4 /* Send only if session currently up */
#define XQ_SENDLATER 8 /* Make eligible after session goes down */
#define XQ_IFSENT 16 /* DO NOT Delete if XQ_DELETE+XQ_IMMEDIATE */
/* and file not sent */
queue.c:
void SessionDownQueue(struct SiteQueue *sq)
/*
* In: sq Site node to scan for dead work
*
* Does: All sessions just went down, so remove all IMMEDIATE nodes and
* clear the SENDLATER bits.
*/
{
struct WorkNode *wn, *twn;
wn = FIRST(&sq->workList);
while (twn = NEXT(wn)) {
wn->userFlags &= ~XQ_SENDLATER;
if (wn->userFlags & XQ_IMMEDIATE) {
if (wn->userFlags & XQ_IFSENT)
wn->status = XQ_UNSENT;
else
wn->status = XQ_SENT;
LibRemoveWork(wn);
LibDropObject(wn);
}
wn = twn;
}
}
-eot-